package com.ray.config;

import com.ray.pojo.School;
import com.ray.pojo.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

@Configuration
@ComponentScan("com.ray.pojo")
public class AppConfig
{
    @Bean(name = "userByBean")
    @DependsOn(value = {"school"})
    Student student()
    {
        return new Student();
    }

    @Bean()
    School school()
    {
        return new School();
    }
}
